import request from '../utils/request'
// 车辆事故登记列表
export let sglist = () => {
    return request({
        url:"/api/sglist",
        method:"GET",
    })
}

// 查看单条数据
export let sgselect=(sgid)=>{  
    return request({
        url:"/api/sgselect",
        method:"GET",
        params:{
            sgid
        }
    })
}

// 新增单条数据
export let sginsert=(accidentSpot,accidentTime,accidentType,carNumber,driver,sgid)=>{
    return request({
        url:"/api/sginsert",
        method:"POST",
        data:{
            accidentSpot,accidentTime,accidentType,carNumber,driver,sgid
        }
    })
}

// 删除单条数据
export let sgdelete=(sgid)=>{
    return request({
        url:"/api/sgdelete",
        method:"DELETE",
        params:{
           sgid
         }
    })
}

// 修改单条数据
export let sgupdate=(accidentSpot,accidentTime,accidentType,carNumber,driver,sgid)=>{
    return request({
        url:"/api/sgupdate",
        method:"PUT",
        data:{
            accidentSpot,accidentTime,accidentType,carNumber,driver,sgid
        }
    })
}


// 车辆违章登记列表
export let wzlist = () => {
    return request({
        url: "/api/wzlist",
        method: "GET",
    })
}

// 车辆违章 新增单条数据
export let wzinsert=(carNumber,deductMark,driver,penalty,violationItem,violationTime,wzid)=>{
    return request({
        url:"/api/wzinsert",
        method:"POST",
        data:{
            carNumber,deductMark,driver,penalty,violationItem,violationTime,wzid
        }
    })
}
//车辆违章 删除单条数据

export let wzdelete=(wzid)=>{
    return request({
        url:'/api/wzdelete',
        method:"DELETE",
        params:{
           wzid
        }
    })
}

//车辆违章 查看单条数据
export let wzselect=()=>{  
    return request({
        url:"/api/wzselect",
        method:"GET",
    })
}
//车辆违章 修改单条数据
export let wzupdate=(carNumber,deductMark,driver,penalty,violationItem,violationTime,wzid)=>{
    return request({
        url:"/api/wzupdate",
        method:"PUT",
        data:{
            carNumber,deductMark,driver,penalty,violationItem,violationTime,wzid
        }
    })
}